<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>0.6实现watcher的异步调用</title>
    <script src="./index.js"></script>
</head>
<body>
    
</body>
</html>
<script>
    let vm = new Vue({
        data: {
            message: 'hello vue.js',
            person: {
                name: '123'
            }
        },
        // watch: {
        //     message() {
        //         console.log('选项watch中发生变化');
        //     }
        // }
    })

    vm.$watch('message', () => {
        console.log('$watch中发生变化');
    })
    vm.message = 'hello react.js'
    vm.message = 'hello react.js1'
    vm.message = 'hello react.js2'
</script>
